/**
    package: learn-go
    filename: package_b
    author: diogo@gmail.com
    time: 2021/8/25 11:32
**/
package package_b

import (
	"fmt"
	"gitee.com/diogoxiang/learn-go/example/cycle/demo/callback"
)

func init() {
	callback.RegisterCallBack("getB", new(PackageB).GetB)
}

type PackageB struct {
}

func (b PackageB) GetB() string {
	return "I'm b!"
}

func (b PackageB) PrintAll() {
	fmt.Println(b.GetB())
	fmt.Println(callback.CallBackFunc("getA")[0].(string))
}
